package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author HCG
 * @version 1.0
 * @date 2022/8/23
 */
@AllArgsConstructor
@Getter
public enum NgsStatusEnum {

    ZB(0, "准备"),
    SJPZQ(1, "试剂配制区（片段化反应液及末端修复加A反应液配制）"),
    HSZBQ(2, "核酸制备区"),
    WKZBQ1(3, "文库制备区 （片段化）"),
    WKZBQ2(4, "文库制备区 （末端修复&加A）"),
    WKZBQ3(5, "文库制备区 （接头连接）"),
    WKFJQ1(6, "文库富集区（文库富集）"),
    WKFJQ2(7, "文库富集区（DNA文库混合及杂交）"),
    WKFJQ3(8, "文库富集区（文库捕获）"),
    WKFJQ4(9, "文库富集区（捕获文库富集及pooling）"),
    CXQ(10, "测序区（上机测序）"),
    SJFX(11, "数据分析（测序室、数据室）"),
    END(12, "已完成"),;

    private Integer code;
    private String desc;

    public static NgsStatusEnum getByCode(Integer code) {
        NgsStatusEnum[] values = NgsStatusEnum.values();
        for (NgsStatusEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
